package lexerPackage;

public class Token implements IToken {

	int relativeCode;
	TokenClassEnum tokenClass;
	String matchString;
	
	public Token(int relativeCode, TokenClassEnum tokenClass, String matchString){
		this.relativeCode = relativeCode;
		this.tokenClass = tokenClass;
		this.matchString = matchString;
	}
	
	@Override
	public int getRelativeCode() {
		
		return this.relativeCode;
	}

	@Override
	public TokenClassEnum getClassCode() {
	
		return this.tokenClass;
	}

	@Override
	public int getLength() {

		return matchString.length();
	}

	@Override
	public String getMatchString() {
		
		return matchString;
	}

}
